<template>
  <div>
    <div class="seebox">
      <div class="item" v-for="(item,index) in sheepList" :key="index">
        <div class="id">{{item.earLabelNo}}</div>
        <div class="hao">项圈号：{{item.necklaceNo}} &nbsp; | &nbsp; 月龄：{{item.monthAge}}</div>
        <div class="sex">{{item.sex}}</div>
      </div>
    </div>
  </div>
</template>
<script>
import { queryCricleList2 } from '@/api/record.js'
import { getValue } from '@/utils/auth'

export default {
  components: {},
  data() {
    return {
      sheepList: [] // 羊列表
    }
  },

  mounted() {
    this.loadSheepList()
  },
  methods: {
    loadSheepList() {
      queryCricleList2(getValue('seeRecordId2')).then(res => {
        if (res.status === 0) {
          this.sheepList = res.data.individualList
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.seebox {
  padding: 15px;
  .item {
    height: 36px;
    background: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 10px;
    .sex {
      width: 20px;
      height: 20px;
      margin-right: 6px;
      position: absolute;
      left: 0;
      top: 0;
      border-radius: 6px 0 10px 0;
      z-index: 2;
      background-color: rgba(242, 157, 157, 0.15);
      color: #f29d9d;
      text-align: center;
      line-height: 20px;
    }
    .id {
      font-size: 14px;
      color: #333333;
      margin-right: 15px;
    }
    .hao {
      color: #999999;
      font-size: 12px;
    }
  }
}
</style>
